package com.suneast.suneaststore.bean.personal.trace;

import io.objectbox.annotation.Entity;
import io.objectbox.annotation.Id;

@Entity
public class TraceBean {
    @Id(assignable = true)
    public long id;

    private int goodsId;
    private String dateStr;
    private String url;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }


    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }


    public String getDateStr() {
        return dateStr;
    }

    public void setDateStr(String dateStr) {
        this.dateStr = dateStr;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public TraceBean(int goodsId, String dateStr, String url) {
        this.goodsId = goodsId;
        this.dateStr = dateStr;
        this.url = url;
    }

    public TraceBean() {

    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof TraceBean) {
            TraceBean bean = (TraceBean) obj;
            return goodsId == bean.getGoodsId();
        } else {
            return false;
        }
    }
}
